//
//  CCMenuItemSpriteBatch.m
//  ProjectL
//
//  Created by Nguyen Tan Loc on 10/16/13.
//  Copyright (c) 2013 Nguyen Tan Loc. All rights reserved.
//

#import "CCMenuItemSpriteBatch.h"

@implementation CCMenuItemSpriteBatch

-(void) setNormalImage:(CCNode<CCRGBAProtocol> *)normalImage
{
    if (normalImage != _normalImage)
    {
        [_normalImage release];
        _normalImage = [normalImage retain];
        _normalImage.visible = YES;
    }
}

-(void) setSelectedImage:(CCNode<CCRGBAProtocol> *)selectedImage
{
    if (selectedImage != _selectedImage)
    {
        [_selectedImage release];
        _selectedImage = [selectedImage retain];
        _selectedImage.visible = NO;
    }
}

-(void) setDisabledImage:(CCNode<CCRGBAProtocol> *)disabledImage
{
    if (disabledImage != _disabledImage)
    {
        [_disabledImage release];
        _disabledImage = [disabledImage retain];
        _disabledImage.visible = NO;
    }
}

-(void) setPosition:(CGPoint)position
{
    [super setPosition:position];
    [_normalImage setPosition:position];
    [_selectedImage setPosition:position];
    [_disabledImage setPosition:position];
}

@end
